/**
 * 对象转ComboBox数组
 * @param object
 * @returns {[]}
 */
export function toComboBoxData(object) {
    if (!object) {
        return []
    }
    let data = []
    Object.keys(object).forEach(k => {
        data.push({value: k, text: object[k]})
    })
    return data
}

/**
 * observer 转普通object
 * @param observer
 * @returns {{}}
 */
export function toObject(observer) {
    if (!observer) {
        return {}
    }
    let data = {}
    Object.keys(observer).forEach(k => {
        data[k] = observer[k]
    })
    return data
}